/*
 * @Description: Vuex状态管理
 * @Author: ligy
 * @Date: 2022-03-20 22:05:59
 * @LastEditTime: 2022-03-21 00:14:12
 */
import Vue from 'vue'
import Vuex from 'vuex'
import {setSessionItem} from '../utils/sessionStorage'
Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    token: '' // 存放用户token
  },
  mutations: {
    setToken(state,data){
      state.token = data
      setSessionItem('token',data)
    }
  },
  actions: {
  },
  modules: {
  }
})
